<?php 
// Lay cac thong so cau hinh chung
include "../../app_global.php";
// Lay cac hang so dung chung
include "../../const.php";
// Ham thuc hien lay ten file va hien thi noi dung
include "../../isa-lib/isa-function/isa_public_function.php";
require_once("../../isa-lib/nusoap/nusoap.php");
include "../../isa-lib/isa-function/prax.php";
//Ham thuc hien tao cay
include_once("../../isa-lib/isa-function/class_xslt.php");
// Kiem tra NSD da login hay qua timeout chua
include "../../test_login.php";
//Lay cac thong so de ket noi voi CSDL
include "../../connect.php";
include "../../connect_ado.php";
// Lay cac thong so cau hinh rieng cho chuc nang nay
include "../../onegate_function.php";
// Khoi tao cac bien SESSION chua quyen modul, function cua NSD
include "../../init_session.php";
include "../handle/const.php";
include "../result/const.php";
include "app_local.php";
include "const.php";
include_once $FOLDER_DEVEDIT_CLASS;
// Lay cac hang so cua chuc nang nay
if (!isset($_REQUEST['modal_dialog_mode'])) {
	include "../record-lib/qry_all_recordtype_by_staff.php";//Leav_21/05/2008 them
	include "../../dsp_header.php";
}else{
	include "../../dsp_modal_dialog_header.php";
}
?>
<script src="../../isa-lib/isa-js/isa_util.js" ></script>
<script src="../handle/js_record_handle.js" ></script>
<script src="js_calendar.js" ></script>
<script src="js_record.js" ></script><?php
 //_write_log_file('log.txt','----'.$_SERVER['REMOTE_ADDR'].'------'.$fuseaction);
//echo $fuseaction.'<br>';
switch($fuseaction){
	case "DISPLAY_ALL_RECORD_FOR_NEW";
		$v_detail_status_compare = " And C_DETAIL_STATUS<>20 ";
		$v_status_list = "MOI_TIEP_NHAN";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD";
		$v_title = CONST_RECORD_RECEIVE_NEW_TITLE;
		$v_worktype = "TIEP_NHAN";
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
//-------- NIEUVV hien thi danh sach tre hen hay khong tre hen
	case "DISPLAY_ALL_RECEIVED_RECORD_RELAY";
		$v_detail_status_compare = " And C_DETAIL_STATUS<>20 ";
		$v_status_list = "MOI_TIEP_NHAN";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD";
		$v_title = CONST_RECORD_RECEIVE_NEW_TITLE;
		$v_worktype = "TIEP_NHAN";
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
//---------------------------------------------------------
// Hien thi danh sach da sap xep theo cmnd tang dan	
	case "DISPLAY_ALL_RECORD_FOR_ARRANGE";
		$v_detail_status_compare = " And C_DETAIL_STATUS<>20 ";
		$v_status_list = "MOI_TIEP_NHAN";
		$v_fuseaction_onclick = "DISPLAY_ALL_RECORD_FOR_ARRANGE";
		$v_title = CONST_RECORD_RECEIVE_NEW_TITLE;
		$v_worktype = "TIEP_NHAN";
		$v_show_date = false;
		$v_receive_date = "";
		
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "qry_single_recordtype.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
	case "DISPLAY_ALL_RECORD_FOR_SUPPLYMENT";
		$v_detail_status_compare = " And C_DETAIL_STATUS = 20 ";
		$v_status_list = "DANG_THU_LY";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD_SUPPLYMENT";
		$v_title = CONST_RECORD_RECEIVE_SUPPLYMENT_TITLE;
		$v_worktype = "NHAN_HO_SO_BO_SUNG";
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
	case "DISPLAY_SINGLE_RECORD";
		include "../record-lib/qry_single_record.php";
		include "../record-lib/dsp_single_record.php";
		break;
	case "DISPLAY_SINGLE_RECORD_CONTENT";
		$v_title = CONST_RECORD_CONTENT_TITLE;
		include "../record-lib/qry_single_record.php";
		include "../record-lib/dsp_single_record.php";
		break;
	case "DISPLAY_SINGLE_RECORD_SUPPLYMENT";
		$v_title = CONST_RECORD_SUPPLYMENT_UPDATE_TITLE;
		include "../record-lib/qry_single_record.php";
		include "../record-lib/dsp_single_record.php";
		break;
	case "DISPLAY_ALL_RECORD_SOLVING";
		$v_detail_status_compare = " And C_DETAIL_STATUS <> 20 ";
		$v_status_list = "DANG_THU_LY,TRINH_KY";
		$v_fuseaction_onclick = "DISPLAY_ALL_RECORD_WORK_VUNH";	//---Upadted bu VuNH - 130707
		$v_title = CONST_RECORD_RECEIVE_SOLVING_TITLE;
		$v_worktype = "THU_LY";
		$v_show_date = false;
		$v_receive_date = "";
		$v_xml_file_list = "danh_sach_ho_so_dang_giai_quyet.xml";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;		
	case "PRINT_RECORD_RECEIPT";
		include "../record-lib/qry_single_record.php";
		include "dsp_single_record_receipt.php";
		break;
	case "UPDATE_RECORD";
		include "act_update_record_vunh.php";
		break;
	case "DELETE_RECORD";
		include "act_delete_record.php";
		break;
	case "DISPLAY_RECORD_HANDOVER";
		include "qry_single_recordtype.php";
		include "dsp_single_record_handover.php";
		break;
	case "UPDATE_RECORD_HANDOVER";
		include "act_update_record_handover.php";
		break;
	case "UPDATE_RECORD_LIST_CHECKED";
		include "act_update_record_list_checked.php";
		break;
	case "PRINT_RECORD_HANDOVER";
		include "../record-lib/qry_single_record.php";
		include "dsp_single_record_handover_by_printing.php";
		break;
	case "DISPLAY_LIST_RECORD_MOVE_TO_RESULT";
		$v_list_status = 'MOI_TIEP_NHAN';		
		include "qry_all_record_checked.php";
		include "dsp_single_record_move_result_to_result.php";
		break;
		
	/////////////////////////////////////////////////////////
	//Them cac fuseaction ben handle vao
	case "DISPLAY_ALL_RECORD_WORK_VUNH";
		include "../record-lib/qry_single_record.php";
		include "../handle/qry_all_record_work.php";
		include "../handle/dsp_all_record_work_vunh.php";
		break; 
	case "DISPLAY_ALL_RECORD_WORK";
		include "../record-lib/qry_single_record.php";
		include "../handle/qry_all_record_work.php";
		include "../handle/dsp_all_record_work.php";
		break;
	case "DISPLAY_NAME_RECEIPT";
		include "dsp_name_receipt.php";
		break;	
	case "DISPLAY_SINGLE_RECORD_WORK";
		include "../record-lib/qry_single_record.php";
		include "../handle/qry_all_worktype.php";
		include "../handle/qry_single_record_work.php";
		include "../handle/dsp_single_record_work.php";
		break;
	case "DELETE_RECORD_WORK";
		include "../handle/act_delete_record_work.php"; 
		break;
	case "UPDATE_RECORD_WORK";
		include "../handle/act_update_record_work.php";
		break;
	case "DISPLAY_ALL_RECORD_DOC";
		include "../record-lib/qry_single_record.php";
		include "../handle/qry_all_record_doc.php";
		include "../handle/dsp_all_record_doc.php";
		break;
	case "DISPLAY_SINGLE_RECORD_DOC";
		include "../record-lib/qry_single_record.php";
		include "../handle/qry_single_record_doc.php";
		include "../handle/dsp_single_record_doc.php";
		break;
	case "UPDATE_RECORD_DOC";
		include "../handle/act_update_record_doc.php";
		break;
	case "DELETE_RECORD_DOC";
		include "../handle/act_delete_record_doc.php"; 
		break;
	case "DISPLAY_SINGLE_IDEA";
		include "../handle/qry_single_idea.php";
		include "../handle/dsp_single_idea.php";
		break;
	case "DISPLAY_ALL_IDEA";
		include "../record-lib/qry_single_record.php";
		include "../handle/qry_all_idea.php";
		include "../handle/dsp_all_idea.php";
		break;
	case "DELETE_IDEA";
		include "act_delete_idea.php"; 
		break;
	case "UPDATE_IDEA";
		include "../handle/act_update_idea.php";
		break;
	case "DISPLAY_SINGLE_LICENSE";
		include "../handle/qry_single_license.php";
		include "../handle/dsp_single_license.php";
		break;
	case "UPDATE_LICENSE";
		include "../handle/act_update_license.php";
		break;
	//////////////////////////////////////////////////////////////////
	//				DUYET HO SO DANG KY QUA MANG
	//////////////////////////////////////////////////////////////////
	case "DISPLAY_ALL_NET_RECORD_FOR_INSPECTION";
		//$v_detail_status_compare = " And C_DETAIL_STATUS = 20 ";
		$v_status_list = "0";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_NET_RECORD_FOR_INSPECTION";
		$v_title = "Danh sách hồ sơ đăng ký qua mạng chờ duyệt";
		//$v_worktype = "NHAN_HO_SO_BO_SUNG";
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../customer/qry_all_record.php";
		include "../customer/dsp_all_record.php";
		break;
	case "DISPLAY_SINGLE_NET_RECORD_FOR_INSPECTION";
		$v_worktype = "INSPECTION";
		$v_title = "Duy&#7879;t h&#7891; s&#417; &#273;ang k&#253; qua m&#7841;ng";		
		include "../customer/qry_single_record.php";
		include "../customer/dsp_single_customer_record.php";
		break;
	///////////////////////////////////////////////////////////////////
	case "DISPLAY_MULTIPLE_RECORD_FOR_SEND_MAIL";
		include "../result/qry_all_selected_id_record.php";
		include "../result/dsp_all_record_for_send_mail.php";
		break;
	case "SENDING_EMAIL";
		include "../result/act_send_email.php";
		break;
	//////////////////////////////////////////////////////////////////
	//// In Nhãn Hồ Sơ - VuNH ///////////////////////////////////////
	case "PRINT_RECORD_RECEIPT_LABEL";
		include "../record-lib/qry_single_record.php";
		include "dsp_single_record_receipt_label.php";
		break;
	/////////////////////////////////////////////////////////////////
	//Leav:Hien Thi DANH SACH HO SO THONG BAO PHAT
	case "DISPLAY_ALL_RECORD_NOTIFY_PHAT";
		$v_detail_status_compare = " And C_DETAIL_STATUS = 25 ";
		$v_status_list = "DANG_THU_LY";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD";
		$v_title = CONST_RECORD_RECEIVE_NOTIFY_PHAT;
		$v_worktype = "NOTIFY_PHAT";
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
	case "DISPLAY_ALL_RECORD_NOTIFY_TAX";
		$v_detail_status_compare = " And C_DETAIL_STATUS = 24 ";
		$v_status_list = "DANG_THU_LY";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD";
		$v_title = CONST_RECORD_RECEIVE_NOTIFY_TAX;
		$v_worktype = "NOTIFY_TAX";
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
	case "DISPLAY_NOTIFY";
		$v_title = CONST_RECORD_RECEIVE_NOP_TAX_AND_PHAT;
		$v_worktype="TN_RTB_THUE";
		include "../record-lib/qry_single_record.php";
		include "qry_all_worktype.php";
		include "qry_single_record_work.php";
		include "qry_all_notify.php";
		include "dsp_single_notify.php";
		break;
	case "DISPLAY_NOTIFY_PHAT"; 
		$v_title = CONST_RECORD_RECEIVE_NOP_TAX_AND_PHAT;
		$v_worktype="TN_RTB_PHAT";
		include "../record-lib/qry_single_record.php";
		include "qry_all_worktype.php";
		include "qry_single_record_work.php";
		include "qry_all_notify.php";
		include "dsp_single_notify.php";
		break;
	case "UPDATE_RECORD_NOTIFY_TAX_TN";
		$v_request_id_record=$_REQUEST['hdn_record_id_list'];
		include "act_update_record_work_TN_thue.php";
		break;
	case "DISPLAY_ALL_RECORD_DA_NOP_PHAT";
		$v_title = CONST_RECORD_DA_NOP_PHAT_TITLE;
		$v_detail_status_compare = " And C_DETAIL_STATUS = 11 ";
		$v_status_list = "DANG_THU_LY";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD_SUPPLYMENT";
		$v_title = CONST_RECORD_DA_NOP_PHAT_TITLE;
		$v_worktype = "DANH_SACH_HS_DA_NOP_PHAT";
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
	case "DISPLAY_ALL_RECORD_DA_NOP_THUE";
		$v_title = CONST_RECORD_DA_NOP_THUE_TITLE;
		$v_detail_status_compare = " And C_DETAIL_STATUS = 11 ";
		$v_status_list = "DANG_THU_LY";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD_SUPPLYMENT";
		$v_title = CONST_RECORD_DA_NOP_THUE_TITLE;
		$v_worktype = "DANH_SACH_HS_DA_NOP_THUE";
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
	//Leav_end
	default:
		$v_detail_status_compare = " And C_DETAIL_STATUS<>20 ";
		$v_status_list = "MOI_TIEP_NHAN";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD";
		$v_title = CONST_RECORD_RECEIVE_NEW_TITLE;
		$v_worktype = "TIEP_NHAN";
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "qry_single_recordtype.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
}
include "../../disconnect.php";
if (!isset($_REQUEST['modal_dialog_mode'])) {
	include "../../dsp_footer.php";
}else{
	include "../../dsp_modal_dialog_footer.php";
}?>